<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
         language="java" %>
<%@ include file="/jsp/platform/include/include.jsp" %>
<html>
<head>
    <TITLE><c:out value="${_LOGONUSER_.MANAGETITILE}"/>
    </TITLE>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <%@ include file="/jsp/platform/include/header.jsp" %>
</HEAD>
<BODY>
<DIV class="all">
    <%@ include file="/jsp/platform/include/head.jsp" %>
    <%@ include file="/jsp/platform/include/menu.jsp" %>
    <DIV class="mains">
        <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
            <TBODY>
            <TR valign="top">
                <%@ include file="/jsp/platform/include/mainLeft.jsp" %>
                <TD>
                    <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
                        <TBODY>
                        <TR>
                            <TD>
                                <TABLE width="180" border="0" cellspacing="0" cellpadding="0">
                                    <TBODY>
                                    <TR>
                                        <TD width="7"><IMG width="7" height="36" alt=""
                                                           src="<%=request.getContextPath()%>/images/pages_l.jpg">
                                        </TD>
                                        <TD align="center"
                                            background="<%=request.getContextPath()%>/images/pages_bg.jpg">
                                            <SPAN class="f_tit1">当日对账查询</SPAN></TD>
                                        <TD width="7"><IMG width="7" height="36" alt=""
                                                           src="<%=request.getContextPath()%>/images/pages_r.jpg">
                                        </TD>
                                    </TR>
                                    </TBODY>
                                </TABLE>
                            </TD>
                        </TR>
                        </TBODY>
                        <TR>
                            <TD>
                                <div class="pages_con">
                                    <div class="pages_con_20">
                                        <TABLE class="table"
                                               style="font-size:12px;text-align: center">
                                            <CAPTION>入款对账结果</CAPTION>
                                            <THEAD style="color:#333">
                                            <TR style="text-align: center">
                                                <TH>交易笔数</TH>
                                                <TH>交易总金额</TH>
                                                <TH>收单方交易笔数</TH>
                                                <TH>收单方交易金额</TH>
                                                <TH>差异笔数</TH>
                                                <TH>差异金额</TH>
                                            </TR>
                                            </THEAD>
                                            <TBODY>
                                            <c:forEach var="model" items="${list}">
                                                <c:if test="${'1'== model.billType}">
                                                    <tr>
                                                        <td><c:out value="${model.tradeCount}"/>笔
                                                        </td>
                                                        <td><fmt:formatNumber pattern="#,##0.00" value="${model.tradeSum}"/>元
                                                        </td>
                                                        <td><c:out value="${model.oppTradeCount}"/>笔</td>
                                                        <td><fmt:formatNumber pattern="#,##0.00" value="${model.oppTradeSum}"/> 元</td>
                                                        <td><c:out value="${model.diffCount}"/> 笔</td>
                                                        <td><fmt:formatNumber pattern="#,##0.00" value="${model.diffSum}"/> 元
                                                        </td>
                                                    </tr>
                                                </c:if>
                                            </c:forEach>
                                            </TBODY>
                                        </TABLE>
                                        <TABLE class="table"
                                               style="font-size:12px;text-align: center">
                                            <CAPTION>出款对账结果</CAPTION>
                                            <THEAD style="color:#333">
                                            <TR style="text-align: center">
                                                <TH>出款笔数</TH>
                                                <TH>出款金额</TH>
                                                <TH>第三方出款笔数</TH>
                                                <TH>第三方出款金额</TH>
                                                <TH>差异笔数</TH>
                                                <TH>差异金额</TH>
                                            </TR>
                                            </THEAD>
                                            <TBODY>
                                           <c:forEach var="model" items="${list}">
                                                 <c:if test="${'2'== model.billType}">
                                                    <tr>
                                                        <td><c:out value="${model.tradeCount}"/>笔
                                                        </td>
                                                        <td><fmt:formatNumber pattern="#,##0.00" value="${model.tradeSum}"/>元
                                                        </td>
                                                        <td><c:out value="${model.oppTradeCount}"/>笔</td>
                                                        <td><fmt:formatNumber pattern="#,##0.00" value="${model.oppTradeSum}"/> 元</td>
                                                        <td><c:out value="${model.diffCount}"/> 笔</td>
                                                        <td><fmt:formatNumber pattern="#,##0.00" value="${model.diffSum}"/> 元
                                                        </td>
                                                    </tr>
                                                </c:if>
                                            </c:forEach>
                                            </TBODY>
                                        </TABLE>

                                        <A class="btn confirm margin_l_10" onClick="reIncomeBillCheck();"
                                           href="javascript:void(0);">重新入款对账</A> <A
                                            class="btn confirm margin_l_10" target="_blank"
                                            href="<%=request.getContextPath()%>/manage/billCheckLog/incomeBillDetail">入款对账明细</A> <A
                                            class="btn confirm margin_l_10" onClick="reOutcomeBillCheck();"
                                            href="javascript:void(0);">重新出款对账</A> <A
                                            class="btn confirm margin_l_10" target="_blank"
                                            href="<%=request.getContextPath()%>/manage/billCheckLog/outcomeBillDetail">出款对账明细</A>
                                    </div>
                                </div>
                                <!--当中内容块结束--></TD>
                        </TR>
                    </TABLE>
                </TD>
            </TR>
            </TBODY>
        </TABLE>
    </DIV>
    <%@ include file="/jsp/platform/include/foot.jsp" %>
    <script type="text/javascript">
        function reIncomeBillCheck() {
            $.messager.confirm("操作提示", "您确定要执行此操作吗！", function (data) {
                if (data) {
                	ajaxLoading();
                    var url = '<%=request.getContextPath()%>/manage/billCheckLog/reIncomeBillCheck';
                    $.post(
                            url,
                            {
                               
                            },
                            function(data) {
                            	ajaxLoadEnd();
                                if (data.success) {
                                    $.messager.alert("提示信息", data.msg, "info", function() {
                                        window.location.href = window.location.href;
                                    });
                                } else {
                                    $.messager.alert("提示信息", data.msg);
                                }
                            });
                }
            });
        }
        
        function reOutcomeBillCheck() {
            $.messager.confirm("操作提示", "您确定要执行此操作吗！", function (data) {
                if (data) {
                	ajaxLoading();
                    var url = '<%=request.getContextPath()%>/manage/billCheckLog/reOutcomeBillCheck';
                    $.post(
                            url,
                            {
                               
                            },
                            function(data) {
                            	ajaxLoadEnd();
                                if (data.success) {
                                    $.messager.alert("提示信息", data.msg, "info", function() {
                                        window.location.href = window.location.href;
                                    });
                                } else {
                                    $.messager.alert("提示信息", data.msg);
                                }
                            });
                }
            });
        }
    </script>
</BODY>
</HTML>
